import VueRouter  from "vue-router";

import App from '../App'


const route = new VueRouter({
  routes:[
    {
      path:'/',redirect:'/app'
    },
    {
      path:'/app',
      meta:{title:'小米商城(仿写)'},
      component:App
    }
  ]
})



route.afterEach((to,from,next)=>{
      if(to.meta.title)
      {
        document.title=to.meta.title;
      }
      else
      {
        document.title='小米商城(仿写)';
      }
})

export default route